﻿@page "/barcodereaders"
@inject IStringLocalizer<BarcodeReaders> Localizer

<h3>@Localizer["Title"]</h3>

<h4>@Localizer["SubTitle"]</h4>

<p><b>@Localizer["Attention"]</b></p>
<ul class="ul-demo">
    <li>@((MarkupString)Localizer["Li1"].Value )</li>
    <li>@((MarkupString)Localizer["Li1"].Value )</li>
    <li>@((MarkupString)Localizer["Li1"].Value )</li>
    <li>@Localizer["Li4"]</li>
</ul>

<DemoBlock Title="@Localizer["BasicUsageTitle"]" Introduction="@Localizer["BasicUsageIntro"]" Name="Normal">
    <p>@Localizer["Step"]</p>
    <ul class="ul-demo mb-3">
        <li>@Localizer["BasicUsageLi1"]</li>
        <li>@Localizer["BasicUsageLi2"]</li>
        <li>@Localizer["BasicUsageLi3"]</li>
    </ul>
    <BarcodeReader OnInit="@OnInit" OnResult="@OnResult" OnStart="@OnStart" OnClose="@OnClose" OnError="@OnError" />
    <BlockLogger @ref="Trace" class="mt-3" />
</DemoBlock>

<DemoBlock Title="@Localizer["ImageTitle"]" Introduction="@Localizer["ImageIntro"]" Name="Image">
    <p>@Localizer["Step"]</p>
    <ul class="ul-demo mb-3">
        <li>@Localizer["ImageLi1"]</li>
        <li>@Localizer["ImageLi2"]</li>
        <li>@Localizer["ImageLi3"]</li>
    </ul>
    <BarcodeReader ScanType="@ScanType.Image" OnResult="@OnImageResult" OnError="@OnImageError" />
    <BlockLogger @ref="Trace2" class="mt-3" />
</DemoBlock>

<DemoBlock Title="@Localizer["AutoStartTitle"]" Introduction="@Localizer["AutoStartIntro"]" Name="AutoStart">
    <p>@Localizer["Step"]</p>
    <ul class="ul-demo mb-3">
        <li>@Localizer["AutoStartLi1"]</li>
        <li>@Localizer["AutoStartLi2"]</li>
        <li>@Localizer["AutoStartLi3"]</li>
    </ul>
    <BarcodeReader OnResult="@OnImageResult" OnError="@OnImageError" AutoStart="true" />
    <BlockLogger @ref="Trace2" class="mt-3" />
</DemoBlock>

<AttributeTable Items="@GetAttributes()" />
